#!/usr/bin/env node

/**
 * 脚本测试
 * 链接：https://github.com/enquirer/enquirer
 */
// const {execShell} = require("./.exec");

(async() => {
  const { AutoComplete } = require('enquirer')

  const prompt = new AutoComplete({
    name: 'flavor',
    message: 'Pick your favorite flavor',
    limit: 10,
    initial: 2,
    choices: [
      'Almond',
      'Apple',
      'Banana',
      'Blackberry',
      'Blueberry',
      'Cherry',
      'Chocolate',
      'Cinnamon',
      'Coconut',
      'Cranberry',
      'Grape'
    ]
  })

  prompt.run()
    .then(answer => console.log('Answer:', answer))
    .catch(console.error)
})()
